package mud;

import mud.unit.Action;

/** Implemented by things that can engage in combat */
public interface Combatable extends Interactable {

    /**
     * @return the battle in which the combatant is engaged, if any
     */
    public Battle getBattle();

    /**
     * @param battle the battle in which the combatant is engaged, if any
     */
    public void setBattle(Battle battle);

    /**
     * @return whether the combatant is currently engaged in a battle
     */
    public boolean isInCombat();

    /**
     * @return the action that the combatant will perform during its next turn
     */
    public Action getNextAction();

    /**
     * Called when defending against a basic attack from the given attacker
     * @param attacker the combatant that is attacking
     */
    public void defend(Combatable attacker);

    /**
     * @return the health of the combatant
     */
    public long getHealth();

    /**
     * @return the strength of the combatant
     */
    public long getStrength();
}
